#ifndef WORKER_H
#define WORKER_H

#include <QThread>
#include <QVariant>
#include <QtCore>
#include <QTimer>

class worker : public QThread
{
    Q_OBJECT
public:
    explicit worker(QObject *parent = 0);
    void formatDev2Fat32(QString disk, QString labelName);
    void copyFiles2Disk(QString disk, QString filePath);
    void makeDeviceBootable(QString disk);
    
signals:
    void doingPercent(QVariant index, QVariant per);
    
public slots:
    void timeoutAction();

private:
    void run();
public:
    int index;
    QString disk;
    QString label;
    QTimer *timer;
    int perVal;
};

#endif // WORKER_H
